package great.project.controller;

import great.project.core.MessageResult;
import great.project.config.WebConfig;
import great.project.service.i.MobileMessageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <div  style="border:2px solid none;margin:20px;padding:15px;font-size:24px;text-align:center;color:aqua;">
 *
 *  短信服务切换测试
 *
 *  切换服务在 {@link WebConfig#mobileMessageService()} 中切换.达到使用目的
 *
 *  </div>
 *
 * @author RichMan
 * @date 2021-01-13 0:31
 */
@RestController
@RequestMapping("mobileMessage")
public class TestMobileMessageServiceController {

    @Resource
    private MobileMessageService mobileMessageService;

    @GetMapping("send-v1")
    public MessageResult sendMessage1(
            String mobile,
            String message
    ){
        return mobileMessageService.sendMessage(mobile,message);
    }

    @GetMapping("send-v2")
    public MessageResult sendMessage2(
            String mobile,
            String message
    ){
        return mobileMessageService.sendMessage(mobile,message);
    }

}
